﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BrettM.Web.Hosting
{
    public class ErrorHandler
    {
        private static readonly object _syncRoot = new object();
        private static ErrorHandlerList _errorHandlers;

        public static ErrorHandlerList ErrorHandlers
        {
            get
            {
                if (_errorHandlers == null)
                {
                    lock (_syncRoot)
                    {
                        if (_errorHandlers == null)
                        {
                            _errorHandlers = new ErrorHandlerList();
                        }
                    }
                }
                return _errorHandlers;
            }
            set
            {
                lock (_syncRoot)
                {
                    _errorHandlers = value;
                }
            }
        }
    }
}
